function [Block_Size] = HF_Get_Blocksize(Rate,Interleaver_L)

%*----------------------------------------- HF_Get_Blocksize ---------------------------------------%
%
% [Block_Size] = HF_Get_Blocksize(Rate,Interleaver_L)
%
% the function returns the size of the blocks (Block_Size) dependent on the
% (Rate) and the Interleaver length (Interleaver_L).
%
%*-------------------- BlOCK SIZE AS FN OF DATA RATE AND INTERLEAVER LENGTH -----------------%
%
%                                       INTERLEAVER LENGTH IN FRAMES 
%                           
%                           1             3              9               18             36                72      
%DATA RATE         
%
%  3200                 384        1152       3456          6912       13824         27648
%  4800                 576        1728       5184         10368      20736         41472
%  6400                 768        2304       6912         13824      27648         55296
%  8000                 960        2880       8640         17280      34560         69120
%  9600                 1152      3456      10368        20736      41472         82944
%
%*-------------------------------------------------------------------------------------%

LUT_Blocks = [384        1152       3456          6912       13824         27648;
                        576        1728       5184         10368      20736         41472;
                        768        2304       6912         13824      27648         55296;
                         960        2880       8640         17280      34560         69120;
                         1152      3456      10368        20736      41472         82944];

Data_Rates = [3200 4800 6400 8000 9600];
Interleaver_Lengths = [1 3 9 18 36 72];

Rate_Index = find(Data_Rates==Rate);
Interleaver_Index = find(Interleaver_Lengths==Interleaver_L);

Block_Size = LUT_Blocks(Rate_Index,Interleaver_Index);
%*-------------------------------------------------------------------------------------%
